function ajaxRequest(url, params, callback)
{   
    $.ajax({
            type: "POST",
            url: url,
            data: params,
            dataType: "json",
            success: function(data){ajaxRequestRecive(data, callback);}//,
            //error: ajaxErrorMessage
    });
    
}

function ajaxGetRequest(url, params, callback)
{   
    $.ajax({
            type: "GET",
            url: url,
            data: params,
            dataType: "json",
            success: function(data){ajaxRequestRecive(data, callback);}//,
            //error: ajaxErrorMessage
    });
    
}

function ajaxRequestRecive(response, callback)
{
    if(callback)
        callback.apply(this, [response]);
}